package org.jeecg.modules.wms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.wms.entity.WmsInboundOrder;
import org.jeecg.modules.wms.entity.WmsWarehouse;
import org.jeecg.modules.wms.entity.WmsWarehouseLocation;
import org.jeecg.modules.wms.vo.WmsInboundOrderVO;

import java.util.List;
import java.util.Map;

/**
 * 入库单数据库操作接口
 */
public interface WmsInboundOrderMapper extends BaseMapper<WmsInboundOrder> {
    
    /**
     * 分页查询入库单列表
     */
    IPage<WmsInboundOrderVO> queryInboundOrderPageList(Page<WmsInboundOrderVO> page, @Param("query") Map<String, Object> params);

    
    /**
     * 根据ID查询入库单详情
     */
    WmsInboundOrderVO getInboundOrderById(@Param("id") String id);
    
    /**
     * 更新库位状态
     */
    void updateLocationStatus(@Param("params") Map<String, Object> params);
    
    /**
     * 根据ID查询仓库信息
     */
    WmsWarehouse getWarehouseById(@Param("id") String id);
    
    /**
     * 根据ID查询库位信息
     */
    WmsWarehouseLocation getLocationById(@Param("id") String id);
    
    /**
     * 移动端入库单查询 - 支持折叠显示和模糊搜索
     */
    IPage<WmsInboundOrderVO> queryInboundOrderForMobile(Page<WmsInboundOrderVO> page, @Param("query") Map<String, Object> query);

}